Return GDK_FILTER_CONTINUE for unhandled message types.
authorOwen Taylor <otaylor@redhat.com>
Thu, 26 Feb 2004 22:53:50 +0000 (22:53 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 26 Feb 2004 22:53:50 +0000 (22:53 +0000)
Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
        GDK_FILTER_CONTINUE for unhandled message types.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
        multiple filters for the same event type with the standard
        "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.

        * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
        Append to the filter list not prepend, since order now matters.

        * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter):
        Append to the filter list not prepend, since order now matters.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/win32/gdkevents-win32.c
gdk/x11/gdkevents-x11.c

index 7d781581d58992e235966afb85bd6da5d415cc44..c88616bb29b68acb6bead271bf36de611031117a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+       GDK_FILTER_CONTINUE for unhandled message types.
+
+       * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
+       multiple filters for the same event type with the standard
+       "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
+
+       * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
+       Append to the filter list not prepend, since order now matters.
+
+       * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter): 
+       Append to the filter list not prepend, since order now matters.
+       
 Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fixes for #135333, analysed by Damon Chaplin:
index 7d781581d58992e235966afb85bd6da5d415cc44..c88616bb29b68acb6bead271bf36de611031117a 100644 (file)
@@ -1,3 +1,18 @@
+Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+       GDK_FILTER_CONTINUE for unhandled message types.
+
+       * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
+       multiple filters for the same event type with the standard
+       "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
+
+       * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
+       Append to the filter list not prepend, since order now matters.
+
+       * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter): 
+       Append to the filter list not prepend, since order now matters.
+       
 Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fixes for #135333, analysed by Damon Chaplin:
index 7d781581d58992e235966afb85bd6da5d415cc44..c88616bb29b68acb6bead271bf36de611031117a 100644 (file)
@@ -1,3 +1,18 @@
+Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+       GDK_FILTER_CONTINUE for unhandled message types.
+
+       * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
+       multiple filters for the same event type with the standard
+       "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
+
+       * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
+       Append to the filter list not prepend, since order now matters.
+
+       * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter): 
+       Append to the filter list not prepend, since order now matters.
+       
 Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fixes for #135333, analysed by Damon Chaplin:
index 7d781581d58992e235966afb85bd6da5d415cc44..c88616bb29b68acb6bead271bf36de611031117a 100644 (file)
@@ -1,3 +1,18 @@
+Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+       GDK_FILTER_CONTINUE for unhandled message types.
+
+       * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
+       multiple filters for the same event type with the standard
+       "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
+
+       * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
+       Append to the filter list not prepend, since order now matters.
+
+       * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter): 
+       Append to the filter list not prepend, since order now matters.
+       
 Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fixes for #135333, analysed by Damon Chaplin:
index 7d781581d58992e235966afb85bd6da5d415cc44..c88616bb29b68acb6bead271bf36de611031117a 100644 (file)
@@ -1,3 +1,18 @@
+Thu Feb 26 17:29:04 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+       GDK_FILTER_CONTINUE for unhandled message types.
+
+       * gdk/x11/gdkevents-x11.c (gdk_event_translate): Allow
+       multiple filters for the same event type with the standard
+       "GDK_FILTER_CONTINUE == pretend I wasn't here" semantics.
+
+       * gdk/x11/gdkevents-x11.c (gdk_display_add_client_message_filter):
+       Append to the filter list not prepend, since order now matters.
+
+       * gdk/win32/gdkevents-win32.c (gdk_add_client_message_filter): 
+       Append to the filter list not prepend, since order now matters.
+       
 Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fixes for #135333, analysed by Damon Chaplin:
index bfa82da8f3452e52cc87405e1ba9d798385e631f..89e854896b1c4708ba6e161270022f9f44c37ccd 100644 (file)
@@ -812,7 +812,7 @@ gdk_add_client_message_filter (GdkAtom       message_type,
   filter->function = func;
   filter->data = data;
   
-  client_filters = g_list_prepend (client_filters, filter);
+  client_filters = g_list_append (client_filters, filter);
 }
 
 static void
index 2c84d9d4691115018e7257ae883c12ec7b69221b..ddb8009c3225be9e5ef2560e51db72d8dd62d05b 100644 (file)
@@ -355,8 +355,8 @@ gdk_display_add_client_message_filter (GdkDisplay   *display,
   filter->data = data;
   
   GDK_DISPLAY_X11(display)->client_filters = 
-    g_list_prepend (GDK_DISPLAY_X11 (display)->client_filters,
-                   filter);
+    g_list_append (GDK_DISPLAY_X11 (display)->client_filters,
+                  filter);
 }
 
 /**
@@ -1867,13 +1867,14 @@ gdk_event_translate (GdkDisplay *display,
        while (tmp_list)
          {
            GdkClientFilter *filter = tmp_list->data;
+           tmp_list = tmp_list->next;
+           
            if (filter->type == message_type)
              {
                result = (*filter->function) (xevent, event, filter->data);
-               break;
+               if (result != GDK_FILTER_CONTINUE)
+                 break;
              }
-           
-           tmp_list = tmp_list->next;
          }
 
        switch (result)
@@ -2014,6 +2015,8 @@ gdk_wm_protocols_filter (GdkXEvent *xev,
        _gdk_x11_set_input_focus_safe (display, toplevel->focus_window,
                                       RevertToParent,
                                       xevent->xclient.data.l[1]);
+
+      return GDK_FILTER_REMOVE;
     }
   else if ((Atom) xevent->xclient.data.l[0] == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PING") &&
           !_gdk_x11_display_is_root_window (display,
@@ -2026,9 +2029,11 @@ gdk_wm_protocols_filter (GdkXEvent *xev,
                  xev.xclient.window,
                  False, 
                  SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+
+      return GDK_FILTER_REMOVE;
     }
 
-  return GDK_FILTER_REMOVE;
+  return GDK_FILTER_CONTINUE;
 }
 
 void